const app = getApp()

Page({
  data: {
    winHeight: 0
  },
  //监听传值，后面自己做处理了
  cityTap(e) {
    const cityName = e.detail.cityname;
    app.globalData.city=cityName
    wx.switchTab({
      url: '../../pages/index/index'
    })
    let pages=getCurrentPages();
    let prpage=pages[0];
    console.log(prpage)
    prpage.onLoad()
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    const win = wx.getSystemInfoSync();
    this.setData({
      winHeight: win.windowHeight
    });

  }
})
